import React, { Component } from 'react';
import { WhiteSpace, WingBlank, List, InputItem, Button } from 'antd-mobile'
import './User.less';

class Login extends Component {
		constructor(props){
			super(props);
			this.regist = this.regist.bind(this);
		}
		
		regist () {
			this.props.history.push('/regist');
		}
		
    render () {
      return (
        <WingBlank>
        	<h1 className="UserTitle" >Login</h1>
					<WhiteSpace />
					<List>
						<InputItem placeholder="请输入用户名">用户</InputItem>
						<InputItem placeholder="请输入密码">密码</InputItem>
					</List>
					<WhiteSpace />
					<Button type="primary">登录</Button>
					<WhiteSpace />
					<Button type="primary" onClick={this.regist}>注册</Button>
        </WingBlank>
      )
    }
}

export default Login;